import java.awt.*;

import javax.swing.*;


public class Actividad10 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		JFrame f=new JFrame();
		f.setSize(300,200);
		
		f.getContentPane().setLayout(new BoxLayout(f.getContentPane(), BoxLayout.Y_AXIS));
		
		JButton b1=new JButton("Botton 1");
		JButton b2=new JButton("Botton 2");
		JButton b3=new JButton("Botton 3");
		JButton b4=new JButton("Long-name Botton 4");
		JButton b5=new JButton("Botton 5");

		b1.setAlignmentX(Component.CENTER_ALIGNMENT);
		b2.setAlignmentX(Component.CENTER_ALIGNMENT);
		b3.setAlignmentX(Component.CENTER_ALIGNMENT);
		b4.setAlignmentX(Component.CENTER_ALIGNMENT);
		b5.setAlignmentX(Component.CENTER_ALIGNMENT);
		
		f.getContentPane().add(b1);
		f.getContentPane().add(b2);
		f.getContentPane().add(b3);
		f.getContentPane().add(b4);
		f.getContentPane().add(b5);
		
		f.setVisible(true);

	}

}
